import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/components/Login'
import HelloWorld from '@/components/HelloWorld'
import NotebooksList from '@/components/NotebooksList'
import TrashDetail from '@/components/TrashDetail'
import NoteDetail from '@/components/NoteDetail'
Vue.use(Router)
const originalPush = Router.prototype.push;
Router.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}




export default new Router({
  routes: [
    {
      path: '/',
      alias:'/notebooks',
      component: ()=>import('@/components/NotebooksList')
    }
    , {
      path: '/login',
      name: 'Login',
      component: ()=>import('@/components/Login')
    }
    ,{
      path: '/notebooks',
      component: ()=>import('@/components/NotebooksList')
    },{
      path:'/note',
      component: ()=>import('@/components/NoteDetail')
    }
    ,{
      path:'/trash/',
      component: ()=>import('@/components/NoteDetail')
    }
  ]
})
